home *** CD-ROM | disk | FTP | other *** search
- Path: web.cae.ca!usenet
- From: fraserh@cae.ca (Fraser Hutchinson)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Why is C faster than FORTRAN?
- Date: 18 Mar 1996 19:30:13 GMT
- Organization: CAE Electronics Ltd.
- Message-ID: <4ikdk5$rck@web.cae.ca>
- References: <4hv2ho$d8t@news.interpath.net> <4i2c5e$t70@kiwi.futuris.net> <4i4poj$j7e@thorn.cc.usm.edu> <4i74inINNnfj@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: pch63.cae.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In article <4i74inINNnfj@keats.ugrad.cs.ubc.ca>, c2a192@ugrad.cs.ubc.ca says...
- >
- >In article <4i4poj$j7e@thorn.cc.usm.edu>,
- >Peter Sakalaukus <sakalauk@coam.usm.edu> wrote:
- >>I have two programs, FORTRAN and C. They both use the same algorithm to
- >>manipulate numeric data. The larger the data file though, the faster the
- >>C version is, (in relation to the FORTARN program). I am running on a UNIX
-
- [snip]
-
- >
- >>My question is: what is the reason that C is so much quicker? Is C normally
- >>faster than FORTRAN?
-
- I would suspect that this is because Fortran routines have to be more general
- in nature than C code, and thus incurs the overhead of generality. A similar
- case may be stated for the printf() set of routines which are considerably
- slower than write()s.
-
- Fraser
-
-